/* 基础样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部 */
header {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
}

header h1 {
    margin: 0;
    display: inline;
}

nav {
    float: right;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

.search {
    float: right;
    margin-left: 20px;
}

.search input {
    padding: 5px;
    border: none;
    border-radius: 3px;
}

.search button {
    padding: 5px 10px;
    background-color: #ff6600;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    background: url('hero.jpg') no-repeat center center/cover;
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.btn {
    background-color: #ff6600;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
}

/* 商品区域 */
.products {
    padding: 50px 0;
    text-align: center;
}

.product-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.product {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    width: 30%;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.product img {
    max-width: 100%;
    border-radius: 5px;
}

.product h3 {
    font-size: 1.5em;
    margin: 10px 0;
}

.product p {
    font-size: 1.2em;
    color: #333;
}

/* 页脚 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product {
        width: 45%;
    }
}

@media (max-width: 480px) {
    .product {
        width: 100%;
    }
}
/*  新增轮播图样式 */ 
.hero {
    position: relative;
    height: 500px; /* 可根据需要调整高度 */
    overflow: hidden;
}

.carousel {
    position: absolute;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 150px; /* 根据实际高度调整 */
    color: white;
}

/* 原有按钮样式增强 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff4757;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #ff6b81;
}